#include<iostream>
using namespace std;

#include<assert.h>
#include"vector.hpp"


void test_vector1()
{
	
	MyVector::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);

	MyVector::vector<int>::iterator it = v.begin();
	while (it != v.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;
	v.pop_pack();
	v.pop_pack();
	v.pop_pack();

	for (auto ch : v)
	{
		cout << ch << " ";
	}
	cout << endl;

}

void test_vector2()
{
	MyVector::vector<int> v;

	v.push_back(1);

	v.push_back(2);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(4);
	v.push_back(5);
	cout << v.size() << ":" << v.capacity() << endl;
	auto pos = find(v.begin(), v.end(), 1);
	v.erase(pos);
	cout << v.size() << ":" << v.capacity() << endl;

	for (auto e : v)
	{
		cout << e << " ";
	}
	cout << endl;

}

int main()
{

	test_vector1();
	test_vector2();


	return 0;
}